<template>
  <div>
    <h3>{{ show }}</h3>
    <h3>{{ showNu }}</h3>

    <button @click="sub1">-1</button>
  </div>
</template>

<script>
import { mapState, mapMutations, mapActions, mapGetters } from "vuex";
export default {
  computed: {
    // 计算属性
    ...mapGetters(["show"]),
    ...mapGetters({
      showNu: "showNu",
    }),
  },
  methods: {
    // 方法
    ...mapMutations(["sub1"]),
  },
};
</script>
<style>
</style>